import {
  TimePicker,
  Row,
  Col,
  DataSet,
} from 'choerodon-ui/pro';
import React, {useMemo} from 'react';
import timeDS from './timeDataSet';

function onChange(value: Date | undefined, oldValue: Date | undefined) {
  console.log(value, oldValue);
}

const DatePick12h: React.FC = (): React.ReactElement => {
  const timeDataSet:DataSet = useMemo(()=> new DataSet(timeDS()), []);
  return (
    <Row gutter={10}>
      <Col span={12}>
        <TimePicker onChange={onChange} dataSet={timeDataSet} name="time" />
      </Col>
      <Col span={12}>
        <TimePicker onChange={onChange} dataSet={timeDataSet} name="time2" />
      </Col>
    </Row>
  );
};

export default DatePick12h;